package control;

import java.io.IOException;
import java.util.List;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

import model.Curso;
import model.DAOCurso;
import model.DAOProfessor;
import model.Professor;

public class ListarProfessorCursoCadastroTurmaTag extends SimpleTagSupport{
	
	public void doTag() throws JspException, IOException 
		{
			DAOProfessor daoProf = new DAOProfessor();
			DAOCurso daoCu = new DAOCurso();
			List<Professor> profs = daoProf.findALL();
			List<Curso> cursos = daoCu.findALL();
			
			getJspContext().setAttribute("profs", profs);
			getJspContext().setAttribute("cursos", cursos);
			getJspBody().invoke(null);
		}

}
